Background: RNA bacteriophages like Qbeta and MS2 are well known for their high mutation rate, short infection cycle and strong selection against foreign inserts. The hammerhead ribozyme (HHRz) is a small self-cleaving RNA molecule whose active residues have previously been identified by mutational analysis of each individual base. Here the functionally important bases of HHRz were determined in a single screening experiment by inserting the HHRz into the genome of MS2. Findings: The minimal HHRz of satellite Tobacco ringspot virus was cloned into the genome of RNA bacteriophage MS2. Sequence analysis of the surviving phages revealed that the majority had acquired single base-substitutions that apparently inactivated the HHRz. The positions of these substitutions exactly matched that of the previously determined core residues of the HHRz. Conclusions: Natural selection against a ribozyme in the genome of MS2 can be used to quickly identify nucleotides required for self-cleavage.